#include<iostream>
#include<string>
using namespace std;
string s;
int main()
{
	getline(cin, s);
	for (int i = 0; i < s.size(); i++) {
		if (s[i] >= 'A' && s[i] <= 'Z') {
			s[i] += 32;
		}
	}
	bool flag = 0;
	for (int i = s.size() - 1; i >= 0; i--) {
		if (s[i] >= 'a' && s[i] <= 'z') {
			if ((s[i] == 'a') || (s[i] == 'e') || (s[i] == 'i')
				|| (s[i] == 'y') || (s[i] == 'u') || (s[i] == 'o')) {
				flag = 1;
			}
			break;
		}
	}
	if (flag)
		cout << "YES" << endl;
	else
		cout << "NO" << endl;
	return 0;
}